home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / include / Xm / ListP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-30  |  3.9 KB  |  186 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. 
  3.  * ALL RIGHTS RESERVED 
  4. */ 
  5. /* 
  6.  * Motif Release 1.2.3
  7. */ 
  8. /*   $RCSfile: ListP.h,v $ $Revision: 10.1 $ $Date: 1994/02/03 15:43:17 $ */
  9. /*
  10. *  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  11. #ifndef _XmListP_h
  12. #define _XmListP_h
  13.  
  14. #include <Xm/List.h>
  15. #include <Xm/PrimitiveP.h>
  16. #include <Xm/ScrollBar.h>
  17. #include <Xm/ScrolledW.h>
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. /*  List struct passed to Convert proc for drag and drop */
  24. typedef struct _XmListDragConvertStruct
  25. {
  26.    Widget w;
  27.    XmString * strings;
  28.    int num_strings;
  29. } XmListDragConvertStruct;
  30.  
  31. /*  List class structure  */
  32.  
  33. typedef struct _XmListClassPart
  34. {
  35.    XtPointer extension;   /* Pointer to extension record */
  36. } XmListClassPart;
  37.  
  38.  
  39. /*  Full class record declaration for List class  */
  40.  
  41. typedef struct _XmListClassRec
  42. {
  43.    CoreClassPart        core_class;
  44.    XmPrimitiveClassPart primitive_class;
  45.    XmListClassPart     list_class;
  46. } XmListClassRec;
  47.  
  48. externalref XmListClassRec xmListClassRec;
  49.  
  50. /****************
  51.  *
  52.  * Internal form of the list elements.
  53.  *
  54.  ****************/
  55.  
  56. typedef    struct {
  57.     _XmString    name;
  58.     Dimension    height;
  59.     Dimension    width;
  60.     Dimension    CumHeight;
  61.     Boolean        selected;
  62.     Boolean        last_selected;
  63.     Boolean        LastTimeDrawn;
  64.     unsigned short    NumLines;
  65.     int        length;
  66. #ifdef LIST_COLOUR_ITEMS
  67.         Pixel           fg, bg;
  68. #endif
  69. #ifdef LIST_CLIENT_DATA
  70.         XtPointer       client_data;
  71. #endif
  72. } Element, *ElementPtr;
  73.  
  74. /*  The List instance record  */
  75.  
  76. typedef struct _XmListPart
  77. {
  78.     Dimension    spacing;
  79.     short           ItemSpacing;
  80.     Dimension       margin_width;
  81.     Dimension        margin_height;
  82.     XmFontList     font;
  83.     XmString    *items;
  84.     int        itemCount;
  85.     XmString    *selectedItems;
  86.         int             *selectedIndices;
  87.     int        selectedItemCount;
  88.     int         visibleItemCount;
  89.     int         LastSetVizCount;
  90.     unsigned char    SelectionPolicy;
  91.     unsigned char    ScrollBarDisplayPolicy;
  92.     unsigned char    SizePolicy;
  93.         XmStringDirection StrDir;
  94.  
  95.         Boolean        AutoSelect;
  96.         Boolean        DidSelection;
  97.         Boolean        FromSetSB;
  98.         Boolean        FromSetNewSize;
  99.         Boolean        AddMode;
  100.     unsigned char    LeaveDir;
  101.     unsigned char    HighlightThickness;
  102.     int         ClickInterval;
  103.         XtIntervalId    DragID;
  104.     XtCallbackList     SingleCallback;
  105.     XtCallbackList     MultipleCallback;
  106.     XtCallbackList     ExtendCallback;
  107.     XtCallbackList     BrowseCallback;
  108.     XtCallbackList     DefaultCallback;
  109.  
  110.  
  111.     GC        NormalGC;    
  112.     GC        InverseGC;
  113.     GC        HighlightGC;
  114.         Pixmap          DashTile;
  115.     ElementPtr    *InternalList;
  116.     int        LastItem;
  117.     int        FontHeight;
  118.     int        top_position;
  119.     char        Event;
  120.     int        LastHLItem;
  121.     int        StartItem;
  122.     int        OldStartItem;
  123.     int        EndItem;
  124.     int        OldEndItem;
  125.     Position    BaseX;
  126.     Position    BaseY;
  127.     Boolean        MouseMoved;
  128.     Boolean        AppendInProgress;
  129.     Boolean        Traversing;
  130.     Boolean        KbdSelection;
  131.     short        DownCount;
  132.     Time        DownTime;
  133.     int        CurrentKbdItem;
  134.     unsigned char    SelectionType;
  135.     GC        InsensitiveGC;
  136.  
  137.     int vmin;          /*  slider minimum coordiate position     */
  138.     int vmax;          /*  slider maximum coordiate position     */
  139.     int vOrigin;          /*  slider edge location                  */
  140.     int vExtent;          /*  slider size                           */
  141.  
  142.     int hmin;          /*  Same as above for horizontal bar.     */
  143.     int hmax;
  144.     int hOrigin;
  145.     int hExtent;
  146.  
  147.     Dimension    MaxWidth;
  148.     Dimension    CharWidth;
  149.     Position    XOrigin;
  150.     
  151.     XmScrollBarWidget       hScrollBar;
  152.     XmScrollBarWidget       vScrollBar;
  153.     XmScrolledWindowWidget  Mom;
  154.     Dimension    MaxItemHeight;
  155.     
  156. } XmListPart;
  157.  
  158.  
  159. /*  Full instance record declaration  */
  160.  
  161. typedef struct _XmListRec
  162. {
  163.    CorePart       core;
  164.    XmPrimitivePart primitive;
  165.    XmListPart       list;
  166. } XmListRec;
  167.  
  168.  
  169. /********    Private Function Declarations    ********/
  170. #ifdef _NO_PROTO
  171.  
  172.  
  173. #else
  174.  
  175.  
  176. #endif /* _NO_PROTO */
  177. /********    End Private Function Declarations    ********/
  178.  
  179.  
  180. #ifdef __cplusplus
  181. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  182. #endif
  183.  
  184. #endif /* _XmListP_h */
  185. /* DON'T ADD ANYTHING AFTER THIS #endif */
  186.